<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<link href="<%=request.getContextPath()%>/css/css.css" rel="stylesheet">
<title>Insert title here</title>
</head>
<script src="/vandor/jquery/jquery.min.js"></script>
<script type="text/javascript">

function add(){
	
	$.post("add",$("form").serialize(),function(obj){
		
		if(obj>0){
			
			alert("添加成功!");
			 
			location="list.do";
			
		}else
			{
			
				alert("添加失败!");
			
			}
		
	},'json');
	
}

</script>

<body>

<form action="add" method="post">

	<table>
	
		<tr>
		
			<td>
			
				影片名称:<input type="text" name="mname">
			
			</td>
		
		</tr>
		
		<tr>
		
			<td>
			
				介绍:<textarea rows="5" cols="5" name="introduction"></textarea>
			
			</td>
		
		</tr>
	
	</table>
	
		<input type="button" value="添加" onclick="add()">

</form>

</body>
</html>